package com.directv.z8training.EMS.Services;

import java.sql.SQLException;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.directv.z8training.EMS.DAO.ProjectDAO;

@Service
public class ProjectManagementImpl implements ProjectManagement {
	
	@Autowired
	ProjectDAO projectDAO;

	@Override
	@Transactional
	public void createProject(String username, String code, String description, Date startdate,
			Date enddate) throws SQLException {
		try{
		projectDAO.createProject(username, code, description, startdate, enddate);
		}catch (Exception e){
			throw new SQLException();
		}
		
	}
	
}
